<!DOCTYPE html>
<html style="height:100%;"><head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta property="qc:admins" content="135340217545216112633">
    <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=2">
    <meta content="telephone=no" name="format-detection">
    <meta charset="utf-8">
    <meta name="copyright" content="">
    <meta name="Keywords" content="">
    <meta name="description" content="">
    <title>中石化助力青运，一路“油”你</title>
    <link href="__PUBLIC__/Css/common.css" rel="stylesheet" />
	<link href="__PUBLIC__/Css/page.css" rel="stylesheet" />
    </head>
<body>

<div class="page" id="index">



    <div class="alert_box">
        <!--分享弹窗-->
        <div class="alert_bg_cover" id="share" onclick="closeShare();" style="display: none;">
            <div class="alert_no_box" >
                    <img src="__PUBLIC__/Images/share_bg.png" />
            </div>
        </div>
        <if condition="$isWinGift eq 1">
        <!--温馨提示：每玩一次游戏结束后只有中奖才跳回首页弹窗提示-->
        <div class="alert_bg_cover" id="warmRemind" style="display:block;">
            <div class="alert_no_box" >
                <div class="alert_head">
                    <img src="__PUBLIC__/Images/alert_top4.png"/>
                </div>

                <div class="word_rule">
                    <p>您已经提交获奖信息，具体礼品详情及送件方式请在<span style="color:#ff0000;">"我的奖品"</span>中查看。<br><br>
                        当前还有<span style="color:#ff0000;"><span id="number" class="remaindTimes">{$rest}</span>次</span>游戏中奖机会
                    </p>
                </div>
                <div class="bottom_btn_right" onclick="closeWarmRemind();">
                    <img src="__PUBLIC__/Images/alert_sure_btn.png"/>
                </div>
            </div>
        </div>
        </if>

        <!--游戏结束：游戏次数用完之后若再点游戏，则提示游戏结束-->
        <div class="alert_bg_cover" id="gameOver" style="display:none;">
            <div class="alert_no_box" >
                <div class="alert_head">
                    <img src="__PUBLIC__/Images/alert_top3.png"/>
                </div>
                <div class="word_rule">
                    <p>您的游戏已经结束，不要太贪心哦~<br><br>
                        获得的礼品详情及送件方式请在<span style="color:#ff0000;">"我的奖品"</span>中查看。<br><br>
                        敬请期待我们为您提供的更多活动。
                    </p>
                </div>
                <div class="bottom_btn_right" onclick="closeGameOver();">
                    <img src="__PUBLIC__/Images/alert_sure_btn.png"/>
                </div>
            </div>
        </div>

        <!--领奖门店-->
        <div class="alert_bg_cover" id="getPlace" style="display:none;">
            <div class="alert_no_box" >
                <div class="alert_head">
                    <img src="__PUBLIC__/Images/get_place.png"/>
                </div>
                <div class="alert_prize_content">
                    <ul id="activity_stores">
                        <li>
                            <p class="store_address">福州北门加油站（鼓楼区福飞南路4号）</p>
                            <p class="contacter">曾敏 0591-87835645</p>
                        </li>
                        <li>
                            <p class="store_address">宁德本部中心站（蕉城区和平路1号）</p>
                            <p class="contacter">黄通明 0593- 2810032</p>
                        </li>
                        <li>
                            <p class="store_address">莆田中心站（荔城区大坝桥头）</p>
                            <p class="contacter">余晗  0594-2790774</p>
                        </li>
                        <li>
                            <p class="store_address">三明本部六路站（三明市梅列区东新六路）</p>
                            <p class="contacter">朱燕青 0598-8292953</p>
                        </li>
                        <li>
                            <p class="store_address">南平本部滨江站 （南平市东教路中段延平区国道205线2129公里300米）</p>
                            <p class="contacter">吴丽娟 0599- 8832503</p>
                        </li>
                        <li>
                            <p class="store_address">泉州本部汀州站 （泉州丰泽区宝洲路）</p>
                            <p class="contacter">欧建伟 0595-22536099</p>
                        </li>
                        <li>
                            <p class="store_address">龙岩本部罗桥站（龙岩市新罗区西安北路116号）</p>
                            <p class="contacter">黄丽梅 0597-2290941</p>
                        </li>
                        <li>
                            <p class="store_address">厦门湖里站（厦门市湖里区湖里兴隆路1号）</p>
                            <p class="contacter">郑永民 0592- 6023394</p>
                        </li>
                        <li>
                            <p class="store_address">漳州本部东南站（漳州市芗城区东一号路与马灶路交叉口(现水仙大街51号)）</p>
                            <p class="contacter">余志鸿  0596-2680755</p>
                        </li>
                    </ul>
                </div>
                <div class="bottom_btn_right" onclick="closeGetPlace();">
                    <img src="__PUBLIC__/Images/alert_sure_btn.png"/>
                </div>
            </div>
        </div>

        <!--我的奖品-->
        <div class="alert_bg_cover" id="myPrize" style="display:none;">
            <div class="alert_no_box" >
                <div class="alert_head">
                    <img src="__PUBLIC__/Images/alert_top2.png"/>
                </div>
                <div class="alert_prize_content">
                    <!--没有奖品时-->
                    <empty name="my_prize_list">
                        <img src="__PUBLIC__/Images/alert_none_now.png" style="width: 22%;margin-left: 44%;margin-top: 20%;"/>
                    <!--</else>-->
                        <!--有奖品时-->
                        <else />
                        <ul style="display:block;">
                            <volist name="my_prize_list" id="vo">
                                <div class="prize-li">
                                    <h5 style="color:#ff0000;text-align: center;font-size:14px;">奖品</h5>

                                    <if condition="$vo['prize_name'] eq '中石化海龙燃油宝'">
                                        <li>
                                            <label>奖品：</label>
                                            <span>中石化海龙燃油宝</span>
                                        </li>
                                        <li>
                                            <label>领取时间：</label>
                                            <span>2015年11月2日-12月31日</span>
                                        </li>
                                        <li>
                                            <label>领取门店：</label>
                                            <span onclick="lookStores();">（须自行提取）&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;查看></span>
                                        </li>
                                        <else />
                                        <li>
                                            <label>奖品：</label>
                                            <span>价值{$vo.worth}元{$vo.prize_name}</span>
                                        </li>
                                        <li>
                                            <label>领取时间：</label>
                                            <span>2015年11月2日-12月31日</span>
                                        </li>
                                    </if>
                                </div>
                            </volist>
                        </ul>
                    </empty>
                </div>
                <div class="bottom_btn_left" onclick="share();">
                    <img src="__PUBLIC__/Images/alert_share.png"/>
                </div>
                <div class="bottom_btn_right" onclick="closeMyPrize();">
                    <img src="__PUBLIC__/Images/alert_sure_btn.png"/>
                </div>
            </div>
        </div>


        <!--第一次进入自动弹出游戏规则-->
        <div class="alert_bg_cover" id="gameRule" style="display:none;">
            <div class="alert_no_box" >
                <div class="alert_head">
                    <img src="__PUBLIC__/Images/alert_top5.png"/>
                </div>
                <div class="enter_left">
                    <img src="__PUBLIC__/Images/enter_left.png"/>
                </div>
                <div class="enter_right">
                    <img src="__PUBLIC__/Images/enter_right.png"/>
                </div>
                <div class="word_rule">
                    <p>点击<span style="color:#ff0000;">左右箭头</span>控制小车移动，在10s内尽可能多得吃掉礼物。规避路上的炸弹哟！
                        参与1次游戏即可获得1个礼盒，打开礼盒填写个人资料后将有机会获得由<span style="color:#ff0000;">中石化森美福建</span>提供的
                        <span style="color:#ff0000;">燃油宝、青运会纪念邮折</span>，更有<span style="color:#ff0000;">500元、200元、100元加油卡</span>等您来拿！
                        每个微信号有3次参与机会，心动不如手指动~
                    </p>
                </div>
                <div id="confirm_rule" class="bottom_btn_right">
                    <img src="__PUBLIC__/Images/alert_sure_btn.png"/>
                </div>
            </div>
        </div>






        <!--奖品设置-->
        <div class="alert_bg_cover" id="prizeSetting" style="display:none;">
            <div class="alert_no_box" >
                <div class="alert_head">
                    <img src="__PUBLIC__/Images/alert_top1.png"/>
                </div>
                <div class="alert_prizes">
                    <ul>
                        <li>
                            <img src="__PUBLIC__/Images/jiang1.png">
                            <p class="prize_name">{$prize_list[0]['prize_name']}</p>
                            <p class="prize_worth">价值{$prize_list[0]['worth']}元</p>
                        </li>
                        <li>
                            <img src="__PUBLIC__/Images/jiang2.png">
                            <p class="prize_name">{$prize_list[1]['prize_name']}</p>
                            <p class="prize_worth">价值{$prize_list[1]['worth']}元</p>
                        </li>
                        <li>
                            <img src="__PUBLIC__/Images/jiang3.png">
                            <p class="prize_name">{$prize_list[2]['prize_name']}</p>
                            <p class="prize_worth">价值{$prize_list[2]['worth']}元</p>
                        </li>
                        <li>
                            <img src="__PUBLIC__/Images/jiang5.png">
                            <p class="prize_name">{$prize_list[3]['prize_name']}</p>
                            <p class="prize_worth">价值{$prize_list[3]['worth']}元</p>
                        </li>
                        <li>
                            <img src="__PUBLIC__/Images/jiang4.png">
                            <p class="prize_name">{$prize_list[4]['prize_name']}</p>
                            <p class="prize_worth">价值{$prize_list[4]['worth']}元</p>
                        </li>
                    </ul>
                </div>
                <div class="bottom_btn_right" onclick="closePrizeSetting();">
                    <img src="__PUBLIC__/Images/alert_sure_btn.png"/>
                </div>
            </div>
        </div>
    </div>
    <div class="index_bg" >
        <img src="__PUBLIC__/Images/index_bg.png" style="width:100%;min-height:100%;"/>
    </div>
    <div class="top_logo" >
        <img src="__PUBLIC__/Images/logo.png" style="width:100%;"/>
    </div>
	<div class="head_title">
		<img src="__PUBLIC__/Images/word_index.png" style="width:100%;"/>
	</div>
    <div class="index_btn_left">
        <!--背景音乐-->
    <audio controls="controls" autoplay="autoplay" loop="loop" hidden="hidden">
        <source src="__PUBLIC__/bg_sound.mp3" type="audio/mpeg">
    </audio>

        <img src="__PUBLIC__/Images/left_btn_index.png" style="width:100%;"/>
        <div class="btn_my_prize" onclick="alertMyPirze();"><span>&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;</span></div>
        <div class="btn_game_rule" onclick="alertGameRule(1);"><span>&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;</span></div>
        <div class="btn_prize_setting" onclick="alertPrizeSetting();"><span>&nbsp;&nbsp;&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;</span></div>
    </div>
    <div class="start_game" >
        <!--<a  href="" >-->
        <img onclick="check_num();" src="__PUBLIC__/Images/begin_index.png" style="width:100%;"/>
        <!--</a>-->
    </div>
</div>
<script type="text/javascript" src="__PUBLIC__/Js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
    var rest_num = "{$rest}";

    $(function(){
        //玩完一次游戏后，跳回首页，并且弹出温馨提示
        //判断当中奖后弹出温馨提示
//        var is_first = "{:S('first_'.$_SESSION['userid'])}";
//        alert(is_first);
//        $("#warmRemind").show();
//        $("#gameRule").show();
        fenxiang("助力青运，一路“油”你","助力青运，一路“油”你");
    })

    function fenxiang(title,desc){
        //微信分享
        wx.config({
            debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
            appId: "{:C('APPID')}", // 必填，公众号的唯一标识
            timestamp: "{$wxKey['timestamp']}", // 必填，生成签名的时间戳
            nonceStr: "{$wxKey['noncestr']}", // 必填，生成签名的随机串
            signature: "{$wxKey['signature']}",// 必填，签名，见附录1
            jsApiList: ['onMenuShareTimeline','onMenuShareAppMessage'] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
        });
        wx.ready(function () {
            var shareData = {
//            title: '任性！速度进来玩游戏，每天送进口海鲜！连送20天！',
                title: title,
//            desc: '福州电视台首届养生文化节环球海鲜盛宴1月31日开启!微信游戏 抢先上线！',
                desc: desc,
                link: "http://{$_SERVER['HTTP_HOST']}",
                imgUrl: "{:C('APP_URL')}/Public/Images/1.jpg"
            };
            wx.onMenuShareAppMessage(shareData);
            wx.onMenuShareTimeline(shareData);
        });
        wx.error(function(res){
            alert(res.errMsg);
        });
    }

    function closeWarmRemind(){
        $("#warmRemind").hide();
    }
    //弹窗显示我的奖品
    function alertMyPirze(){
        $("#myPrize").show();
    }
    //查看领奖门店
    function lookStores(){
        $("#getPlace").show();
    }
    //关闭门店弹窗
    function closeGetPlace(){
        $("#getPlace").hide();
    }
    //分享
    function share(){
        $("#share").show();
    }
    //点击分享遮盖层时关闭
    function closeShare(){
        $("#share").hide();
    }
    //关闭我的奖品弹窗\
    function closeMyPrize(){
        $("#myPrize").hide();
        $("#share").hide();
    }

    //游戏规则弹窗
    function alertGameRule(way){
        if(way){
            //设置为不跳转
            $("#confirm_rule").attr('onclick','closeGameRule(1)');
        }
        $("#gameRule").show();
    }

    //关闭游戏规则弹窗
    function closeGameRule(way){
        $("#gameRule").hide();
        if(!way){
            window.location.href = "{:U('Home/Index/play')}";
        }
    }

    //奖品设置弹窗
    function alertPrizeSetting(){
        $("#prizeSetting").show();
    }
    //关闭奖品设置弹窗\
    function closePrizeSetting(){
        $("#prizeSetting").hide();
    }

    //开始游戏
    function startGame(v){
        if(v==0){
            $("#gameOver").show();
        }else{
            location.href="gift.html";
        }
    }


    //关闭游戏结束提示弹窗
    function closeGameOver(){
        $("#gameOver").hide();
    }
    //判断是否超出3次
    function check_num(){
        if(rest_num <= 0){
            $("#gameOver").show();
            return false;
        }else{
//            window.location.href = "{:U('Home/Index/play')}";
            $("#gameRule").show();
            $("#confirm_rule").attr('onclick','closeGameRule()');
        }
    }



</script>
</body>
</html>